/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package spiele.tetromino.decorator;

import spiele.block.Block;
import spiele.tetromino.Tetromino;


/**
 *
 * @author martin
 */
public class Line implements Tetromino{
  private final Tetromino _back;
  private final int _height,
                    _num;
  private Line(final Tetromino back, int height, int num){
    _back=back;
    _height=height;
    _num=num;
  }
  
  @Override
  public Block getAt(int col, int row) {
    if (row>_height)
      return _back.getAt(col, row-_num);
    return _back.getAt(col, row);
  }

  @Override
  public int width() {
    return _back.width();
  }

  @Override
  public int heigth() {
    return _back.heigth();
  }
  
}
